package com.cyou.qb.face.service.impl;

import com.cyou.qb.face.entity.Face173AccessLog;
import com.cyou.qb.face.service.BaseFaceService;

public class BaseFaceServiceimpl implements BaseFaceService{
	
	private ThreadLocal<Face173AccessLog> threadLocal = new ThreadLocal<Face173AccessLog>() {
		@Override
		protected synchronized Face173AccessLog initialValue() {
			return new Face173AccessLog();
		}
	};

	
	
	public Face173AccessLog getAccessLog() {
		return threadLocal.get();
	}

	public void setAccessLog(Face173AccessLog accessLog) {
		try {
			threadLocal.set(accessLog);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	@Override
	public void freeAccessLog() {
		try {
			threadLocal.remove();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
}
